<template>
  <el-tabs
    class="c-tabs"
    :value="value"
    @input="$emit('input', $event)"
    @tab-click="handleClick"
  >
    <slot></slot>
  </el-tabs>
</template>
<script>
export default {
  name: 'CTabs',
  components: {},
  props: {
    value: { type: String, default: '' }
  },
  data() {
    return {}
  },
  computed: {},
  watch: {},
  beforeCreate() {},
  created() {},
  beforeMount() {},
  mounted() {},
  beforeUpdate() {},
  updated() {},
  activated() {},
  deactivated() {},
  beforeDestroy() {},
  destroyed() {},
  methods: {
    handleClick(...args) {
      this.$emit('click', ...args)
    }
  }
}
</script>
<style lang="scss">
@include admin {
  .c-tabs {
    .el-tabs__header {
      background-color: #fff;
      margin-bottom: 10px;
      overflow: hidden;
      border-radius: 4px;
    }
    .el-tabs__content {
      height: calc(100% - 52px);
      border-radius: 4px;
    }
    .el-tabs__nav-wrap {
      margin: 0;
      padding: 0 16px;
      box-sizing: border-box;
    }
    .el-tabs__nav-wrap.is-scrollable {
      padding: 0 16px;
    }
    .el-tabs__item {
      height: 42px;
      line-height: 42px;
    }
    .el-tab-pane {
      height: 100%;
    }
  }
}
</style>
